package com.wish.staticproxy;

import com.wish.inter.IPerson;

/**
 * @Author: suliucheng
 * @Date: 2021/2/24 21:02
 * @Description: 父亲代理儿子去找儿媳妇
 */
public class ProxyFather implements IPerson {

    private IPerson person;

    public ProxyFather(IPerson person) {
        this.person = person;
    }

    @Override
    public void findLover() {
        before();
        person.findLover();
        after();
    }

    private void after() {
        System.out.println("找到儿媳妇，成婚！");
    }

    private void before() {
        System.out.println("了解儿子需求，开始去相亲角找。。。");
    }
}
